package com.itmg.factory;

import com.itmg.admin.business.service.AdminService;
import com.itmg.admin.business.service.impl.AdminServiceImpl;
import com.itmg.search.business.service.SearchService;
import com.itmg.search.business.service.impl.SearchServiceImpl;

public class ServiceFactory {
	
	private static SearchService searchService;
	private static AdminService adminService;
	
	public synchronized static SearchService getSearchService(){
		if(searchService == null){
			searchService = new SearchServiceImpl();
		}
		return searchService;
	}
	
	public synchronized static AdminService getAdminService(){
		if(adminService == null){
			adminService = new AdminServiceImpl();
		}
		return adminService;
	}

}
